package biopepa;

import java.util.ArrayList;

public class Node {
	private ObjectNode content; 
	private Node left;
	private Node right;
	private Node parent;
	private ArrayList<NewSpecies> speciesList;
	private ArrayList<ActionEnabled> actions;
	
	public Node(String newNodeName){
		
		content = new ObjectNode( newNodeName ); 
		left = null; 
		right = null;
		parent = null;
		speciesList = new ArrayList<NewSpecies>();
	}
	
	public Node(ObjectNode newObjectNode){
		
		content = newObjectNode; 
		left = null; 
		right = null;
		parent = null;
	}
	
	public ObjectNode getContent()
		{ return content; }
	
	public void setContent(String name) 
		{ content.nodeName = name; } 
	
	public void setContent(ObjectNode cont) 
		{ content = cont; } 
	
	public void setLeftChild(Node child) 
		{ left = child; } 
	
	public void setRightChild(Node child) 
		{ right = child; } 
	
	public void setParent(Node newParent) 
		{ parent = newParent; } 
	
	public void setSpeciesList(ArrayList<NewSpecies> list)
		{speciesList = list;}
	
	public void setActions(ArrayList<ActionEnabled> newActions)
		{actions = newActions;}
	
	public Node getLeftChild() 
		{ return left; } 
	
	public Node getRightChild() 
		{ return right; }
	
	public Node getParent() 
		{ return parent; }
	
	public ArrayList<NewSpecies> getSpeciesList()
		{return speciesList;}
	
	public ArrayList<ActionEnabled> getActions()
		{return actions;}
	
	public boolean hasChildren(){
		boolean bool;
		if(this.getLeftChild() != null || this.getRightChild() != null){
			bool = true;
		}
		else{
			bool = false;
		}
		return bool;
	}

	


}

